
$(document).ready(function() {
    
	$(".submit-bt").click(function() {
		var realName = $.trim($("#real-name").val());
		var cardId = $.trim($("#card-id").val());
		var qq = $.trim($("#qq").val());
		var pic1 = $("#imgUrl_card-f-div").val();
		var pic2 = $("#imgUrl_card-b-div").val();
		
		var nameReg = /^[\u4E00-\u9FA5]{2,6}$/;
		var cardIdReg = /^[0-9A-Z]{18}$/;
		var qqReg = /^[0-9]{5,11}$/;
		if(!nameReg.test(realName)) {
			Utils.msgDialog("真实姓名格式不正确！");
			return;
		} else if(!cardIdReg.test(cardId)) {
			Utils.msgDialog("身份证号格式不正确！");
			return;
		} else if(!qqReg.test(qq)) {
			Utils.msgDialog("QQ号格式不正确！");
			return;
		} else if($.trim(pic1) == "") {
			Utils.msgDialog("请上传身份证正面照！");
			return;
		} else if($.trim(pic2) == "") {
			Utils.msgDialog("请上传个人生活照！");
			return;
		}
		
		var param = {
			realName: realName,
			cardId: cardId,
			qq: qq,
			pic1: pic1,
			pic2: pic2,
		};
		AQ.callAQ("userIdentify.do", param, function(result) {
			Utils.checkDialog("提交成功！我们会在2小时内处理。结果通知到您的QQ邮箱："+qq+"@qq.com<BR><span style='color:#EF1109; padding-top:15px; font-size:18px; font-weight:bold;'>【必看】请主动加审核QQ1121248482为好友</span>", "添加为好友", "用户中心", 
			function() {
				location.replace("tencent://message/?uin=1121248482&Site=qq&Menu=yes");
			}, function() {
				location.replace("user-center.html");
			});
		}, function(err, code){
			Utils.msgDialog(err);
		});
	});
	
});